this.onmessage = function (e) {
    // console.log("message",e.data);
    let startTime = Date.now();
    console.log("开始计算：", startTime);
    let sum = 0;
    for (let i = 0; i < e.data; i++) {
        sum += Math.random();
    }
    console.log("计算结束,花费的时间："+(Date.now()-startTime),"计算结果："+sum);
    this.close();
}